<template>
  <div data-v-f5ffa198="" class="index">
    <div data-v-f5ffa198="" class="center">
      <leftnav></leftnav>
      <router-view></router-view>

    </div>
</div>
</template>
<script>
  // 导入组件
  import leftnav from '../components/leftnav.vue'
  export default {
    name: 'index',
    data() {
      return {
        showclass: 'asideshow',
        showtype: false
      }
    },
    // 注册组件
    components: {
      leftnav
    },
    methods: {},
    created() {
      // 监听
      this.$root.Bus.$on('toggle', value => {
        if (value) {
          this.showclass = 'asideshow'
        } else {
          setTimeout(() => {
            this.showclass = 'aside'
          }, 300)
        }
      })
    },
    beforeUpdate() { },
    // 挂载前状态(里面是操作)
    beforeMount() {
      // 弹出登录成功
      this.$message({
        message: '登录成功',
        type: 'success'
      })
    }
  }
</script>
<style>

</style>